package com.sh.集合;

import com.sh.Test;
import com.sh.泛微.String为什么不可变;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class hashset的底层 {
    public static void main(String[] args) {
        HashSet<Object> objects = new HashSet<>();
        objects.add(1);
        objects.add("a");
        System.out.println(objects);
        ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
        concurrentHashMap.put(1,2);
        Hashtable hashtable = new Hashtable();
        hashtable.put(1,2);


        BigDecimal bigDecimal = new BigDecimal(1);
        BigDecimal bigDecimal2 = new BigDecimal(2);
        bigDecimal.add(bigDecimal2);
        BigDecimal multiply = bigDecimal.multiply(bigDecimal2);
        System.out.println(multiply);
        BigDecimal subtract = bigDecimal.subtract(bigDecimal2);
        System.out.println(subtract);

    }
}

